<template>
	<div class="stu" style="position: relative;">
            <topimg></topimg>
		<div style="width:1100px;margin: 0 auto;padding-top:30px;font-size:14px;">
			<p id="head"><a @click="router_to('/')">首页</a> > <a @click="router_to('/AGVxq')">AGV详情</a> >{{$store.state.AGVxq[index].title}}</p>
			<div style="width:1040px;margin: 0 auto;">
				<div id="theme">{{$store.state.AGVxq[index].title}}</div>
				<div id="time">2020-12-28</div>
				<div class="df" style=" padding: 25px 15px 20px 15px;text-align: left;">
					
				<p>{{$store.state.AGVxq[index].value1}}</p>
				<p>{{$store.state.AGVxq[index].title1}}</p>
			    <img :src="$store.state.AGVxq[index].url1" alt="">
				<p>{{$store.state.AGVxq[index].value2}}</p>
				<img  :src="$store.state.AGVxq[index].url2" alt="">
				<p>{{$store.state.AGVxq[index].value3}}</p>
				</div>
				<div style="padding-bottom: 20px;float: left;">
					<span @click="shangye()">{{$store.state.AGVxq[index].Text}}</span>
					<br />
					<span @click="xiaye()" style="margin-top: 10px;">{{$store.state.AGVxq[index].Text1}}</span>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	import topimg from "@/components/topimg.vue";
	export default {
		name: "stu",
		components: {
			topimg
		}, //声明子组件
		computed: {

        },
		data() {
			return {
                index:0,
			};
		},
		methods: {
			xiaye(){
				document.body.scrollTop = document.documentElement.scrollTop = 0;
				// this.datas = this.$store.state.AGVxq[Number($route.query.num)++];
                ++this.index;
			},
			shangye(){
				document.body.scrollTop = document.documentElement.scrollTop = 0;
				// this.datas = this.$store.state.AGVxq[this.$route.query.num--];
                --this.index;
                console.log(this.index)
			}
		},
		mounted() {
			document.body.scrollTop = document.documentElement.scrollTop = 0;
			this.index = this.$route.query.num;
			// this.datas = this.$store.state.AGVxq[this.$route.query.num];
		}
	}
</script>
<style scoped="scoped">
	.df p{
		text-align:justify;
	}
	#head {
		text-align: left;
		border-bottom: solid 1px #ccc;
		padding: 15px;
	}

	#theme {
		font-size: 24px;
		font-weight: bold;
		margin: 20px auto;
	}

	#time {
		border-bottom: solid 1px #ccc;
		color: #999;
		padding-bottom: 10px;
	}

	span {
		float: left;
	}

	p {
		line-height: 28px;
		font-size: 14px;
	}
</style>

